<template>
  <div>
    <!-- 头部 -->
    <div class="header">
        <div class="tou"></div>
        <div></div>
    </div>
    <!-- 头部 -->


    <!-- 中间部分 -->
    <div class="contaant">
        <p></p>
        <van-form >
            <van-field
                label-width:200px
                v-model="username"
                name="用户名"
                label=""
                placeholder="请输入用户名"
                :rules="[{ required: true, message: '请填写用户名' }]"
            />
            <p></p>
            <van-field
                v-model="password"
                type="password"
                name="密码"
                label=""
                placeholder="请输入密码"
                :rules="[{ required: true, message: '请填写密码' }]"
            />

            <div class="wjma">
                <span>
                    忘记密码
                </span>
            </div>

            <div style="margin: 16px;">
                <!-- <van-button round block type="info" native-type="submit">提交</van-button> -->
                <van-button round type="info" class="btn" @click="deng">登录</van-button>
                <van-button plain hairline type="info"  class="btn">注册</van-button>
            </div>
            </van-form>
    </div>
    <!-- 中间部分 -->


    <!-- 最底下 -->
    <div class="dixia"></div>
    <!-- 最底下 -->



  </div>
</template>

<script>
export default {
    data(){
        return{
            username: '',
            password: '',
        }
    },

    methods:{
        deng(){
            if(this.username || this.password)
            this.$router.push('shou')
        }
    }
}
</script>

<style lang="less" scoped>
.header{
    width: 390px;
    height: 422px;
    background-color: #5EB0F8 ;
    .tou{
        width: 390px;
        height: 46px;
        background-color: #5EB0F8;
    }
}

.contaant{
    width: 295px;
    height: 330px;
    // background-color: green;
    margin: auto;
    margin-top: -180px;
    border: 1px solid #DCEDFD ;
    border-radius: 5px 5px 5px 5px;
    background-color: #FFFFFF ;
}

.wjma{
    display: flex;
    justify-content: flex-end;
    span{
        color: rgba(219, 219, 219, 1);
        font-size: 14px;
        font-family: Microsoft Yahei;
    }
}

.btn{

width: 252px;
height: 51px;
line-height: 20px;
// background-color: rgba(255, 255, 255, 1);
text-align: center;
margin-top: 20px;
}
.dixia{
height: 34px;
background-color: #F8F8F8 ;
position: absolute;
bottom: 0;
}
</style>